import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index'

Vue.use(Router)




export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      meta: {
        title: '首页',
        auth:false,// 是否需要登录
      },
      component: () => import('@/views/index')
    },
    {
      path: '/login',
      name: 'login',
      meta: {
        title: '登录页',
        auth:false,// 是否需要登录
      },
      component: () => import('@/views/login')
    },
    {
      path: '/page1',
      name: 'page1',
      component: () => import('../views/page1/index.vue')
    },

    {
      path: "/404",
      name: "notFound",
      meta: {
        title: '404',
        auth:false,// 不需要登录
      },
      component: () => import('../views/404.vue')
    }, 
    {
      path: "*", // 此处需特别注意置于最底部
      redirect: "/404"
    }
  ]
})
